package com.vcredit.creditcat.manager.product.h5;

import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;

import com.vcredit.creditcat.service.product.h5.IAfterCreditService;


public abstract class AfterCreditAdaptor implements ApplicationContextAware {
	public static final String BEANNAME_PREFIX = "AfterCreditService_";
	
	private ApplicationContext applicationContext;
	
	public void setApplicationContext(ApplicationContext applicationContext) {
		this.applicationContext = applicationContext;
	}
	
	/**
	 * 获取各产品的授信后续提现service实现类
	 * @author zhaoqi01
	 * @param productId
	 * @return
	 */
	public IAfterCreditService getAfterCreditServiceImpl(Long productId) {
		return (IAfterCreditService) applicationContext.getBean(BEANNAME_PREFIX + productId);
	}
}
